package com.tarena.shoot;
/**敌机:是飞行物，也是敌人*/
import java.util.Random;
public class Airplane extends FlyingObject implements Enemy{
	private int speed = 2;
	/**构造方法*/
	public Airplane() {
		image = ShootGame.airplane;
		width = image.getWidth();
		height = image.getHeight();
		Random rand = new Random();
		x = rand.nextInt(ShootGame.WIDTH - width);
		y = -height;
	}
	
	public int getScore() {
		return 5;
	};
	
	public void step() {
			y += speed;
	}
	
	public boolean outOfBounds() {
		return y > ShootGame.HEIGHT;
	}
}
